Namespace Ventas
Public Class ComprobanteDescuento
	Inherits Auditoria.Transaccion

	Private vComprobanteDescuentosId As Integer = -1
	Private vComprobanteId As Integer = -1
	Private vComprobanteNombre As string =""
	Private vDescuentoId As Integer = -1
	Private vDescuentoNombre As string =""
	Private vTipo As Integer = -1
	Private vPorcentaje As Double = 0.0
	Private vMonto As Double = 0.0
	Private vEStado As Integer = -1

	Public Property ComprobanteDescuentosId() As Integer
		Get
			Return vComprobanteDescuentosId
		End Get
		Set(ByVal Value As Integer)
			vComprobanteDescuentosId = Value
		End Set
	End Property

	Public Property ComprobanteId() As Integer
		Get
			Return vComprobanteId
		End Get
		Set(ByVal Value As Integer)
			vComprobanteId = Value
		End Set
	End Property

	Public Property ComprobanteNombre() as string
		Get
			Return vComprobanteNombre
		End Get
		Set(ByVal Value As string)
			vComprobanteNombre = Value
		End Set
	End Property

	Public Property DescuentoId() As Integer
		Get
			Return vDescuentoId
		End Get
		Set(ByVal Value As Integer)
			vDescuentoId = Value
		End Set
	End Property

	Public Property DescuentoNombre() as string
		Get
			Return vDescuentoNombre
		End Get
		Set(ByVal Value As string)
			vDescuentoNombre = Value
		End Set
	End Property

	Public Property Tipo() As Integer
		Get
			Return vTipo
		End Get
		Set(ByVal Value As Integer)
			vTipo = Value
		End Set
	End Property

	Public Property Porcentaje() As Double
		Get
			Return vPorcentaje
		End Get
		Set(ByVal Value As Double)
			vPorcentaje = Value
		End Set
	End Property

	Public Property Monto() As Double
		Get
			Return vMonto
		End Get
		Set(ByVal Value As Double)
			vMonto = Value
		End Set
	End Property

	Public Property EStado() As Integer
		Get
			Return vEStado
		End Get
		Set(ByVal Value As Integer)
			vEStado = Value
		End Set
	End Property

	Sub New()
	End Sub

	Sub New(ByRef ComprobanteDescuentosId As Integer, ByVal ComprobanteId As Integer, ByVal DescuentoId As Integer, ByVal Tipo As Integer, ByVal Porcentaje As Double, ByVal Monto As Double, ByVal EStado As Integer)
		vComprobanteDescuentosId = ComprobanteDescuentosId
		vComprobanteId = ComprobanteId
		vDescuentoId = DescuentoId
		vTipo = Tipo
		vPorcentaje = Porcentaje
		vMonto = Monto
		vEStado = EStado
	End Sub

End Class



 Public Class ComprobanteDescuentoCol   
 Inherits System.Collections.CollectionBase
Private _enmSortDirection As SortDirection
Public Sub New()
_enmSortDirection = SortDirection.Asc
End Sub
Public Sub Sort(ByVal sortExpression As String, ByVal sortDirection As SortDirection)
InnerList.Sort(New Comparer(sortExpression, SortDirection))
End Sub
Public Sub Sort(ByVal sortExpression As String)
InnerList.Sort(New Comparer(sortExpression, _enmSortDirection))
If _enmSortDirection = SortDirection.Asc Then
_enmSortDirection = SortDirection.Desc
Else
_enmSortDirection = SortDirection.Asc
End If
End Sub
Public Function Add(ByVal obj As ComprobanteDescuento) As Integer
Return MyBase.List.Add(obj)
End Function
Public Sub AddPrimero(ByVal obj As ComprobanteDescuento)
MyBase.List.Insert(0, obj)
End Sub
Public ReadOnly Property ComprobanteDescuento(ByVal Index As Integer) As ComprobanteDescuento
Get
Return CType(MyBase.List(Index), ComprobanteDescuento)
End Get
End Property
End Class
end namespace

